package ar.com.personalTravellers.services.impl;

import ar.com.personalTravellers.beans.Hotel;
import ar.com.personalTravellers.daos.HotelDAO;
import ar.com.personalTravellers.services.HotelService;
import com.angel.arquitectura.service.impl.GenericServiceImpl;
import com.angel.arquitectura.service.impl.user.UserServiceImpl;
import org.apache.log4j.Logger;

import java.util.Collection;

public class HotelServiceImpl extends GenericServiceImpl implements HotelService {

    private static Logger LOGGER = Logger.getLogger(UserServiceImpl.class);

    private HotelDAO hotelDAO;

    public Hotel findUniqueByName(String hotelName) {
        HotelDAO hotelDAO = (HotelDAO) super.getGenericDAO();
        return hotelDAO.findUniqueByName(hotelName);
    }

    public Collection<Hotel> findAllByNeighborhoodName(String neighborhoodName) {
        HotelDAO hotelDAO = (HotelDAO) super.getGenericDAO();
        return hotelDAO.findAllByNeighborhoodName(neighborhoodName);
    }

    public Collection<Hotel> findAllByHotelType(String hotelType) {
        HotelDAO hotelDAO = (HotelDAO) super.getGenericDAO();
        Collection<Hotel> entities = hotelDAO.findAllByHotelType(hotelType);
        return entities; 
    }

    public HotelDAO getHotelDAO() {
        return hotelDAO;
    }

    public void setHotelDAO(HotelDAO hotelDAO) {
        this.hotelDAO = hotelDAO;
    }
}